package com.gmail.flashpig8014.pig.util;

public class StringUtils {

	public static int parseInt(String str) {
		if(str == null || str.length() == 0) {
			return 0;
		}
		int result = -1;
		try {
			result = Integer.parseInt(str);
		} catch (Exception e) {
//			e.printStackTrace();
			return -1;
		}
		return result;
	}

	public static void main(String[] args) {
		System.out.println(parseInt("a"));
	}
}
